package com.music.peacerhythms.active;

import android.os.Bundle;
import android.text.Html;
import android.view.View;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

import com.music.peacerhythms.R;
import com.music.peacerhythms.databinding.ActivityWritingBinding;


public class WritingActivity extends AppCompatActivity implements View.OnClickListener {
    ActivityWritingBinding binding;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        binding = ActivityWritingBinding.inflate(getLayoutInflater());
        setContentView(binding.getRoot());
        initAdapter();
    }

    private void initAdapter() {

        iniOnclick();
    }


    private void iniOnclick() {
        binding.goback.setOnClickListener(this);

        initWriting();
    }

    private void initWriting() {

        boolean intent = getIntent().getBooleanExtra("ispri", false);
        if (intent) {
            binding.writename.setText("Privacy Policy");
            String about = "I. Overview of the Agreement<br/>" + "<br/>" + "The purpose of this Privacy Agreement (hereinafter referred to as the \"Agreement\") is to clarify the way in which PeaceRhythms (hereinafter referred to as \"we\" or \"us\") collects, uses and protects users' personal information. This Agreement applies to all users who use the PeaceRhythms App and provide us with personal information.<br/>" + "<br/>" + "II. Information Collection<br/>" + "<br/>" + "1. We will collect personal information such as users' account names and phone numbers in order to provide personalized white noise recommendations and playback services. This information is an optional service and can be opted out of.<br/>" + "2. In the process of use, we may collect the user's device information<br/>" + "(e.g., device model, unique device identifier, etc.), usage Xi, etc., to provide better services.<br/>" + "3. User-generated preference configuration information.<br/>" + "<br/>" + "III. Use of Information<br/>" + "<br/>" + "1. We will use the collected user information to provide personalized white noise recommendation and playback services to meet the individual needs of users.<br/>" + "2. We will only provide the user's personal information to the third-party partner when we have your explicit consent or are required by law.<br/>" + "<br/>" + "IV. Information Protection<br/>" + "<br/>" + "We will take necessary technical and administrative measures to protect users' personal information from leakage, abuse, or loss.<br/>" + "<br/>" + "V. User Rights<br/>" + "<br/>" + "1. Users have the right to view, correct, and delete their personal information.<br/>" + "2. Users have the right to ask us to explain how their personal information is being used.<br/>" + "3. Users have the right to complain to us if they find that their personal information has been misused or misused.<br/>" + "<br/>" + "VI. Governing Law and Dispute Resolution<br/>" + "<br/>" + "1. This Agreement shall be governed by the laws of India.<br/>" + "2. If any dispute arises between the user and us, it shall be resolved through friendly negotiation in the first instance. If the negotiation fails, either party has the right to bring proceedings in the Indian courts.<br/>" + "<br/>" + "VII. Miscellaneous<br/>" + "<br/>" + "1. We have the right to modify and interpret this Agreement.<br/>" + "2. This Agreement shall come into force from the date of the User's first use of the PeaceRhythms App.<br/>" + ("3. If you have any questions " +
                    "that you would like to contact us, please send an email to customer@peacerhythms.com.");

            binding.writing.setText(Html.fromHtml(about));
        } else {

            String about = "PeaceRhythms is an app dedicated to providing Indian users with white noise. Our goal is to help users find moments of peace and relaxation in their busy lives. With PeaceRhythms, you can enjoy pure and comfortable white noise anytime, anywhere, improving focus and sleep quality.<br/>" + "<br/>"  + "Our team is composed of people who love sound and music. We understand the importance of white noise for physical and mental health. Therefore, we decided to develop a simple, powerful white noise app that anyone can enjoy.<br/>" + "<br/>"  + "If you have any questions or suggestions while using the app, please feel free to contact us at customer@peacerhythms.com. We are always here to assist you and provide the best experience possible.";

            binding.writing.setText(Html.fromHtml(about));
        }

    }


    @Override
    public void onClick(View v) {
        int id = v.getId();
        switch (id) {
            case R.id.goback:
                finish();
                break;

        }
    }
}


